Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@withtypes/fs-extra

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@withtypes/fs-extra

FS-Extra with types.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

@withtypes/fs-extra

FS-Extra with types.

Merged fs-extra and @types/fs-extra , install this package to get both, no other features.

Why?

I got tired of having to install an additional @types/** package every time in my TypeScript project to support type inference for these utilities.

So I merged them, but in fact, after installing this package, the original package will still be installed implicitly, and all functions are provided by the original package.

Installation

Install the package from npm (or yarn, or pnpm).

# Just install this package
npm i @withtypes/fs-extra

This replaces the original problem of needing to install twice:

# No need to install this now
npm i fs-extra
npm i -D @types/fs-extra

Usage

This package does not have its own function implementation, Just replace the package name in the import statement.

-import fs from 'fs-extra'
+import fs from '@withtypes/fs-extra'

This package also supports named imports:

-import { readFileSync } from 'fs-extra'
+import { readFileSync } from '@withtypes/fs-extra'

So it is exactly the same APIs as the original package in use.

import { resolve } from 'path'
import { readJSONSync } from '@withtypes/fs-extra'

const pkg = resolve('./package.json')
const { version } = readJSONSync(pkg, 'utf-8')
console.log(version)
// 0.1.0

Documentation

See: Documentation of FS-Extra

License

MIT License © 2022 chengpeiquan

Keywords

FAQs

Package last updated on 21 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc